/**
 * Created by 34984 on 2017/3/26.
 */
function editFun(id){
    var age = document.getElementById('Eage').value;
    var sex = document.getElementById('Esex').value;
    var region = document.getElementById('Eregion').value;
    var income = document.getElementById('Eincome').value;
    var married = document.getElementById('Emarried').value;
    var car = document.getElementById('Ecar').value;
    var mortgage = document.getElementById('Emortgage').value;
    var buy = document.getElementById('Ebuy').value;
    //alert(id+age+sex+region+income+married+car+mortgage+buy);
    $.get("edit.php",{id:id,
        age:age,
        sex:sex,
        region:region,
        income:income,
        married:married,
        car:car,
        mortgage:mortgage,
        buy:buy},
        function(data){
            //alert(data);
            if (data == "t") {
                alert("编辑成功");
                location.reload();
            }
            else {
                alert("编辑失败");
            }
        }
    );

}
function addId(id){
    //alert(id+sno+sname+ssex+sage+major);
   document.getElementById('Eid').value = id;
    /*  document.getElementById('sno').value = sno;
    document.getElementById('sname').value = sname;
    document.getElementById('ssex').value = ssex;
    document.getElementById('sage').value = sage;
    document.getElementById('major').value = major;*/

}